class EventDispatcher extends egret.EventDispatcher {
    private static _instance: EventDispatcher = null;

    private constructor() {
        super();
    }

    public static get getInstance(): EventDispatcher {
        if (this._instance === null) {
            this._instance = new EventDispatcher();
        }
        return this._instance;
    }

    resourceLoadBegin(handle: egret.EventDispatcher) {
        const begin: Events = new Events(Events.ResourceLoadBegin);
        handle.dispatchEvent(begin);
    }

    resourceLoadReady(handle: egret.EventDispatcher) {
        const ready: Events = new Events(Events.ResourceLoadReady);
        handle.dispatchEvent(ready);
    }
}
